<template>
  <basic-container class="noScrollBar tabMain-wrap">
    <common-template
      ref="detailRef"
      :detailOptions="detailOptions"
    ></common-template>
  </basic-container>
</template>

<script>
import commonTemplate from "../commonTemplate";
import {
  getWzjcList,
} from "@/api/sxdky/sxdky";
export default {
  data() {
    return {
      detailOptions: {
        label: "实物资产卡管理",
        name: "mateCardViewList",
        options: {
          height: "calc(100vh - 425px)",
          addBtn: true,
          menuDelBtn: false,
          menuUpBtn: false,
          menuDownBtn: true,
          dialogDirection: "ltr",
          dialogType: "drawer",
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          indexLabel: "序号",
          viewBtn: true,
          selection: true,
          excelBtn: false,
          dialogClickModal: false,
          menuOtherBtn: true, //自定义操作按钮，下载上传
          gistBtn: false,
          align: "center",
          menuAlign: "center",
          searchIcon: true,
          searchIndex: 3,
          labelWidth: 120,
          editBtn: true,
          delBtn: false,
          printBtn: true,
          makeInvolceBtn: false,
          column: [
            {
                label: "部门",
                prop: "department",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "设备类型",
                prop: "deviceType",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "仪器序号",
                prop: "deviceNum",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "仪器设备名称",
                prop: "deviceName",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "仪器设备图片",
                prop: "deviceImg",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "规格型号",
                prop: "sm",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "购置日期",
                prop: "buyDate",
                type: "date",
                sortable: true,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
                rules: [
                    {
                        required: true,
                        message: "请输入购置日期",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "购置价格",
                prop: "price",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "制造厂商",
                prop: "manufacturer",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "资产编码",
                prop: "assetsCode",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "设备编码",
                prop: "deviceCode",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "性能状况",
                prop: "status",
                type: "select",
                search: true,
                editDisplay: true,
                viewDisplay: true,
                rules: [
                    {
                        required: true,
                        message: "请选择性能状况",
                        trigger: "click",
                    },
                ],
                dicData: [
                    {
                        label: "运行",
                        value: 0,
                    },
                    {
                        label: "维修",
                        value: 1,
                    },
                    {
                        label: "报废",
                        value: 2,
                    }
                ],
            },
            {
                label: "保管人",
                prop: "manager",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "存放地点",
                prop: "site",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "保管部门",
                prop: "managerDepartment",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "设备来源",
                prop: "source",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "大修信息",
                prop: "repairInfo",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "异动信息",
                prop: "unusualInfo",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
            },
            {
                label: "检定信息",
                prop: "identifyStatus",
                type: "select",
                search: true,
                editDisplay: true,
                viewDisplay: true,
                rules: [
                    {
                        required: true,
                        message: "请选择检定信息",
                        trigger: "click",
                    },
                ],
                dicData: [
                    {
                        label: "设备未检定",
                        value: 0,
                    },
                    {
                        label: "设备已检定",
                        value: 1,
                    }
                ],
            },
            {
                label: "提交人",
                prop: "userName",
                search: true,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                rules: [
                    {
                        required: true,
                        message: "请输入提交人",
                        trigger: "click",
                    },
                ],
            },
            {
              label: "提交日期",
              prop: "createTime",
              type: "date",
              sortable: true,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              format: "yyyy-MM-dd hh:mm:ss",
              valueFormat: "yyyy-MM-dd hh:mm:ss",
              rules: [
                {
                  required: true,
                  message: "请输入提交时间",
                  trigger: "click",
                },
              ],
            },
            {
                  label: "处理状态",
                  prop: "state",
                  type: "select",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  rules: [
                      {
                          required: true,
                          message: "请选择处理状态",
                          trigger: "click",
                      },
                  ],
                  dicData: [
                      {
                          label: "新建",
                          value: 0,
                      },
                      {
                          label: "待审核",
                          value: 1,
                      },
                      {
                          label: "已审核",
                          value: 2,
                      },
                      {
                          label: "已退件",
                          value: 3,
                      },
                  ],
              },
          ],
        },
        url: {
          getList: getWzjcList,
        },
      },
    };
  },
  components: {
      commonTemplate,
  },
  computed: {},
  created() {
    // let tab = {
    //     name: this.tabList[0].name
    // }
    // this.changeTabsPane(tab);
  },
  methods: {
    // changeTabsPane(tab) {
    //     this.tabList.forEach((item) => {
    //         if(tab.name == item.name) {
    //             this.detailOptions = item;
    //         }
    //     })
    // }
  },
  activated() {
    this.$refs.detailRef.reloadCrud();
  },
};
</script>

<style lang='scss'>
.tabMain-wrap {
  // height: calc(100vh - 400px);
  overflow: hidden auto;
}
</style>
